/********************************************************************
	filename: 	songmanager.h
	author:		zouyf
	created:	2009-9-20  12:09:53
	describ:

*********************************************************************/
#pragma once
#include "../uitls.h"

class FSongManger : public ISongManager
{
	template<class T>
	struct SongLess
	{
		bool operator()(const T& pS1, const T& pS2) const
		{
			return ::wcscmp(pS1->GetSongPath(), pS2->GetSongPath()) < 0;
		}
	};
public:
	void Init(IApplication* pApp);
	~FSongManger();
public:
	virtual UINT GetSongCount();
	virtual ISong* GetSong(int Idx);
	virtual ISong* AddSong(const wchar_t* pPath);
	virtual void DeleteSong(ISong* pSong);
	virtual interface IApplication* GetApplication();

private:
	std::set<ISong*, SongLess<ISong*> > m_SongVec;
	IApplication* m_pApp;
};